#!/bin/bash

# 清理历史数据
Remove-Item -Recurse -Force ".\reports\allure\*"
# 运行测试
pytest --env=test testcases/suite/ --reruns 3 --reruns-delay 2 -n auto --alluredir=reports/allure$PYTEST_XDIST_WORKER

# 获取当前日期
$dateStr = Get-Date -Format "yyyyMMdd"

# 合并报告并生成带时间戳的报告
allure generate reports/allure* -o reports/merged_$dateStr --clean